Improves build time by 30%, resolving issue 5123 "Charts Framework takes a long time to build" #5124
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves issue #5123 "Charts framework takes a long time to build" (#5123) by implementing the recommendations listed at the end of the issue. These changes improved the clean full
Debug
build time by 30%.Issue Link 🔗
Charts framework takes a long time to build
Goals ⚽
Improves build times of the Charts framework target for both clean and incremental
Debug
builds, enabling more parallelization during building.Implementation Details 🚧
This PR makes the following changes:
Eager Linking
build setting toYes
forCharts
framework targetEnable Module Verifier
build setting toNo
forDebug
buildsCompilation Mode
toIncremental
forDebug
builds-Xfrontend -warn-long-expression-type-checking=50
(or perhaps use100
) toOTHER_SWIFT_FLAGS
so the Swift compiler will emit warnings for expressions that take a long time to type-check. The number after the = is the number of milliseconds threshold, above which warnings will be emitted.ChartAnimationEasing.swift
, breaking out expressions which are slow to type-check into separate, quicker-to-type-check expressions.Testing Details 🔍
To test/verify the build time improvement, use these simple steps -- first with the existing code, and then again using this PR branch/commit:
rm -rf $HOME/Library/Developer/Xcode/DerivedData
)